import App from './App'

import http from '@/request/api.js' //将api封装的方法引入到这里进行全局挂载
Vue.prototype.$http = http//将api封装好的axios挂载到prototype上去，全局使用

import config from '@/request/config.js' //将api封装的方法引入到这里进行全局挂载
Vue.prototype.$config = config//将api封装好的axios挂载到prototype上去，全局使用

import uView from "@/uview-ui";
Vue.use(uView);

import share from "./utils/share.js"//全局分享小程序
Vue.mixin(share)

//接口配置
import plugins_request from "@/request/request.js"
Vue.prototype.$api = plugins_request.api;
Vue.prototype.$apiUpload = plugins_request.apiUpload;

// import Video from 'video.js';
// import 'video.js/dist/video-js.css';
// Vue.prototype.$video = Video; // 在原型上注册以便在任何地方都可以使用
// import 'videojs-flash'; // 要播放rtmp流, 就必须引入这哥们

//常用组件
import hxNavbar from "./components/hx-navbar/hx-navbar"
Vue.component('hx-navbar', hxNavbar)

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import TIM from 'TXIM/static/IM-SDK/tim-wx.js';
import TIMUploadPlugin from 'TXIM/static/IM-SDK/index.js';
let options = {
  SDKAppID: 1600049908
};
let tim = TIM.create(options); 
tim.setLogLevel(4);
tim.registerPlugin({'tim-upload-plugin': TIMUploadPlugin});
Vue.prototype.tim = tim;
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif